import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'

//引入全局默认样式
// import './assets/css/reset.css'
import Global from './Global';
Vue.use(Global);

//注册全局组件
import MyList from "./components/MyList";
Vue.component("MyList", MyList)
import MyMenu from './components/MyMenu';
Vue.component(MyMenu.name, MyMenu);
// import AboutCon from './components/AboutCon';
// Vue.component(AboutCon.name, AboutCon);

//注册全局login组件
import Login from "./components/Login";
Vue.component("Login", Login)

Vue.prototype.$globalData = {
  $categoryArr : []
}

Vue.config.productionTip = false

//axios依赖的配置
import axios from "@/utils/request";
Vue.prototype.$http = axios;


//全局过滤器
Vue.filter('formdata', function (v) {
  const dt = new Date(v)
  let n = dt.getFullYear()
  let y = (dt.getMonth() + 1 + '').padStart(2, '0')
  let r = (dt.getDate() + '').padStart(2, '0')
  let s = (dt.getHours() + '').padStart(2, '0')
  let f = (dt.getMinutes() + '').padStart(2, '0')
  let m = (dt.getSeconds() + '').padStart(2, '0')
  return `${n}/${y}/${r} ${s}:${f}:${m}`
})

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
